package com.zhuhjay.service.system.model.dto;


import com.zhuhjay.common.web.annotation.Matching;
import com.zhuhjay.service.system.model.entity.SystemUser;
import lombok.Data;

import static com.zhuhjay.common.web.enums.MatchingMode.NikeName;

/**
 * @author ZhuHJay
 * @date 2023/2/4 11:58
 */
@Data
public class UserUpdateDto {
    @Matching(NikeName)
    private String nickName;

    public SystemUser bean2Entity() {
        SystemUser user = new SystemUser();
        user.setNickName(getNickName());
        return user;
    }
}
